<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
	<title>后台管理</title>
	<link rel="stylesheet" type="text/css" href="./res/css/css.css" />
    <script type="text/javascript" src="./res/js/selecttime.js"></script>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
	<div id="body">
		<div class="title">添加新用户</div>
		<div style="padding:5px;"></div>
		<form method="post" action="index.php?ctl=user&act=Add&a=1" name="add" onsubmit="return checkform();" style="margin:0px;">
		<table width="100%" cellspacing="1" cellpadding="4">
		<tr>
			<td width="120">帐　　号：</td>
			<td><input type="text" name="account" id="account" /></td>
		</tr>
		<tr>
			<td>帐户类型：</td>
			<td><input type="radio" name="user_type" id="user_type" value="1" checked style="border:0px;" />普通用户
				<input type="radio" name="user_type" id="user_type" value="2" style="border:0px;" /><span style="color:ff33ff;">管理员</span>
				
			</td>
		</tr>
        <tr>
			<td>帐户状态：</td>
			<td><input type="radio" name="state" id="state" value="1" checked style="border:0px;" />开通
				<input type="radio" name="state" id="state" value="0" style="border:0px;" /><span style="color:ff33ff;">关闭</span>
				
			</td>
		</tr>
		
		<tr>
			<td>密　　码：</td>
			<td><input type="password" name="password" id="password" /></td>
		</tr>
		<tr>
			<td>重复密码：</td>
			<td><input type="password" name="password2" id="password2" /></td>
		</tr>
		<tr>
			<td>公　　司：</td>
			<td><input type="text" name="company" id="company" /> </td>
		</tr>
		<tr>
			<td>姓　　名：</td>
			<td><input type="text" name="name" id="name" /></td>
		</tr>
        <tr>
			<td>性　　别：</td>
			<td>
            <input type="radio" name="gender" id="gender" value="1" checked style="border:0px;" />男
            <input type="radio" name="gender" id="gender" value="2"  style="border:0px;" />女
            <input type="radio" name="gender" id="gender" value="3"  style="border:0px;" />保密
            </td>
		</tr>
         <tr>
			<td>手　　机：</td>
			<td><input type="text" name="mobile" id="mobile"/></td>
		</tr>
        <tr>
			<td>电　　话：</td>
			<td><input type="text" name="tel" id="tel"/></td>
		</tr>
         <tr>
			<td>E-mail：</td>
			<td><input type="text" name="email" id="email"  /></td>
		</tr>
        <tr>
			<td>地　　址：</td>
			<td><input type="text" name="address" id="address" /></td>
		</tr>
        <tr>
			<td>邮　　编：</td>
			<td><input type="text" name="zip" id="zip"/></td>
		</tr>
        <tr>
			<td>开通时间：</td> 
			<td>
            <input type="text" name="opentime" id="opentime"  readOnly onClick="setDayHM(this);" /></td>
		</tr>
        <tr>
			<td>关闭时间：</td>
			<td><input type="text" name="closetime" id="closetime"  readOnly onClick="setDayHM(this);" /></td>
		</tr>

		</table>
		<div style="text-align:center;padding:5px;">
			<input type="submit" value="提交" /> 　
			<input type="reset" value="重置" />
		</div>
		</form>
	</div>
<script LANGUAGE='javascript'>
function showhelp(sid){
	var ee = document.getElementById("help"+sid);
	if(ee.style.display == "none") {ee.style.display = "block";}
	else {ee.style.display = "none"}
}
function checkform(){
	if (document.add.account.value==''){
		alert('！！！用户名不能为空！');
		document.add.account.focus();
		return false;
	}
	if (document.add.email.value==''){
		alert('！！！邮箱不能为空！');
		document.add.email.focus();
		return false;
	}
	var str_reg=/^\w+((-\w+)|(\.\w+))*\@{1}\w+\.{1}\w{2,4}(\.{0,1}\w{2}){0,1}/ig;
	if (document.add.email.value.search(str_reg) == -1)
	{
		alert("温馨提示！邮箱格式错误！");
		document.add.email.value = "";
		document.add.email.focus();
		return false;
	}
	return true;
}
top.document.title=" 后台管理系统 - 添加新用户";
</script>

</body>
</html>
